import React from 'react';
import {HashRouter as Router,Switch,Route,Redirect} from 'react-router-dom'
import {adminRoutes} from './routers'
import {Button} from "antd"
import "antd/dist/antd.css"
import logo from './logo.svg';
import './App.css';
import Frame from './components/Frame/Index'

function App() {
  return (
    <Frame>
        <h1>我是APP组件</h1>
      <Switch>
          {adminRoutes.map(route=>{
              return <Route
                  key={route.path}
                  path={route.path}
                  exact={route.exact}
                  render={routeProps=>{
                  return <route.component {...routeProps} />;
              }
              }/>
          })}
          <Redirect to={"/404"} />
      </Switch>
    </Frame>
  );
}

export default App;
